<!DOCTYPE html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="viewport" content="width=device-width, initial-scale=1,maximum-scale=1,user-scalable=no">
	<meta name="apple-mobile-web-app-capable" content="yes">
	<meta name="apple-mobile-web-app-status-bar-style" content="black">

	<title>我的订单</title>
	<link rel="stylesheet" href="../css/mui.min.css" />
	<link rel="stylesheet" href="../css/common.css" />
	<link rel="stylesheet" href="../iconfont/iconfont.css" />
	<link rel="stylesheet" href="member.order.css" />
</head>
<body>
	<!--收货地址列表 开始-->
	<div class="mui-content mui-scroll-wrapper container-pull-refresh no-pad">
		<div class="mui-scroll">
			<!--数据列表-->
			<section class="mui-table-view mui-row scroll-data" data-tpl="tpl-order">
				<div class="no-data"><img src="../image/icon-waiting.gif" /></div>
			</section>
		</div>
	</div>
	<!--收货地址列表 结束-->
	
	<!-- 订单模板 开始 -->
	<script type="text/template" id="tpl-order">
		{{if !data || data.length == 0}}
		<div class="no-data">
			<center>暂时无数据</center>
		</div>
		{{/if}}
		{{each data as item idx}}
		<div class="content order" data-id="{{item.id}}" data-total="{{item.order_price_total}}">
			<div class="mui-row btn-flow">
				<label class="mui-col-xs-6 pad-v pad-h-md">订单</label>
				<label class="mui-col-xs-6 pad-v pad-h-md mui-text-right col-rad">
					{{if '1' == item.status}}
					待支付
					{{else if '2' == item.status}}
					待发货
					{{else if '3' == item.status}}
					待收货
					{{else if '4' == item.status}}
					待评价
					{{else if '5' == item.status}}
					待退款
					{{else if '6' == item.status}}
					交易关闭
					{{else if '99' == item.status}}
					交易完成
					{{/if}}
				</label>
			</div>
			{{each item.order_extend as product}}
			<div class="mui-row product" data-id="{{product.goods_id}}">
				<div class="mui-col-xs-3 order-img">
					<img src="{{product.thumb | thumb}}" />
				</div>
				<div class="mui-col-xs-9 pad-v pad-h">
					<p class="product-name">{{product.title}}</p>
					<p class="product-sku">
						{{each product.attr as attr}}{{attr.name}} {{/each}}
					</p>
					<p class="product-price">
						￥{{price(product.pay_total)}}
						<span class="mui-pull-right">
							x {{product.nums}}
						</span>
					</p>
				</div>
			</div>
			{{/each}}
			<div>
				<div class="mui-row pad-h-md pad-v-sm">
					<span class="mui-col-xs-12 order-text">
						<label>订单编号</label>
						<label>{{item.number}}</label>
					</span>
					<span class="mui-col-xs-12 order-text">
						<label>收货地址</label>
						<label>
							{{if item.address_info}}
							{{item.address_info.recipient + ' ' +item.address_info.mobile}}
							{{/if}}
						</label>
					</span>
					{{if item.address_info}}
					<span class="mui-col-xs-12 order-text">
						<label>　　　　</label>
						<label>
							{{item.address_info.province_name + ' ' + item.address_info.city_name　+　' ' + item.address_info.county_name + ' ' + item.address_info.address}}
						</label>
					</span>
					{{/if}}
					<span class="mui-col-xs-12 order-text">
						<label>下单时间</label>
						<label>{{item.create_time}}</label>
					</span>
					<span class="mui-col-xs-12 order-text">
						<label>商品总额</label>
						<label>￥{{price(item.order_price_total)}} <small>(含运费￥{{price(item.freight)}})</small></label>
					</span>
					<span class="mui-col-xs-12 order-text">
						<label>付款总额</label>
						<label>￥{{price(item.pay_total)}}</label>
					</span>
				</div>
				<div class="mui-text-right pad-v-sm pad-h-sm op-row">
					{{if '1' == item.status}}
					<button class="mui-btn mui-btn-outlined btn-cancel">取消订单</button>
					<button class="mui-btn mui-btn-outlined mui-btn-danger btn-repay">立即付款</button>
					{{else if '2' == item.status}}
					<button class="mui-btn mui-btn-outlined btn-hurry-up">催单</button>
					<button class="mui-btn mui-btn-outlined mui-btn-success btn-after-sale">申请售后</button>
					{{else if '3' == item.status}}
					<button class="mui-btn mui-btn-outlined mui-btn-danger btn-confirm">确认收货</button>
					{{else if '4' == item.status}}
					<button class="mui-btn mui-btn-outlined mui-btn-success btn-after-sale">申请售后</button>
					<button class="mui-btn mui-btn-outlined mui-btn-danger btn-comment">立即评价</button>
					<button class="mui-btn mui-btn-outlined btn-remove">删除订单</button>
					{{else if '5' == item.status}}
					<button class="mui-btn mui-btn-outlined" disabled="disabled">退款申请中</button>
					{{else if '6' == item.status}}
					<button class="mui-btn mui-btn-outlined btn-remove">删除订单</button>
					<button class="mui-btn mui-btn-outlined" disabled="disabled">交易关闭</button>
					{{else if '99' == item.status}}
					<button class="mui-btn mui-btn-outlined btn-remove">删除订单</button>
					{{else}}
					<button class="mui-btn mui-btn-outlined" disabled="disabled">未知状态</button>
					{{/if}}
				</div>
			</div>
		</div>
		{{/each}}
	</script>
	<!-- 订单模板 结束 -->
	
	<script type="text/javascript" src="../js/mui.min.js"></script>
	<script type="text/javascript" src="../js/jquery.min.js"></script>
	<script type="text/javascript" src="../js/jquery.ba-bbq.min.js"></script>
	<script type="text/javascript" src="../js/template.js"></script>
	<script type="text/javascript" src="../js/app.js"></script>
	<script type="text/javascript" src="member.order.scroll.js" ></script>
</body>
</html>